package com.kjj;

import android.view.View;
import android.widget.EditText;
import android.widget.ImageButton;

public class LoginView {
    private KjjActivity mActivity;
    private ProductList mList;
    EditText loginEditText;

    public LoginView(KjjActivity activity, ProductList list) {
	mActivity = activity;
	mList = list;
	init();
    }

    public boolean init() {
	return true;
    }

    public boolean startView() {
	mActivity.setContentView(R.layout.login);
	ImageButton loginButton = (ImageButton) mActivity
		.findViewById(R.id.loginEnsurePhoneNumButton);
	loginButton.setOnClickListener(new View.OnClickListener() {

	    @Override
	    public void onClick(View v) {
		EditText text = (EditText) mActivity
			.findViewById(R.id.loginPhoneNumEditText);
		ProductList.phoneNum = text.getText().toString();
		mActivity.switchView(KjjActivity.POST_VIEW);
	    }

	});
	return true;
    }
}
